<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.eagle.utils.DateUtil"%>
<%@page import="java.util.Date"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@page import="com.eagle.utils.StrUtil"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>操作日志查询</title>
    <link href="<%=request.getContextPath()%>/css/main.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%=request.getContextPath()%>/js/common.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath() %>/dateCommon/WdatePicker.js"></script>
     <script language="JavaScript"> 
    //禁止刷新，回退 
    function onKeyDown() 
	 { 
		if ( (event.altKey) || ((event.keyCode == 8) && 
			(event.srcElement.type != "text" && 
			event.srcElement.type != "textarea" && 
			event.srcElement.type != "password")) || 
		   	((event.ctrlKey) && ((event.keyCode == 78) || (event.keyCode == 82)) ) || 
			(event.keyCode == 116) ) { 
 					event.keyCode = 0; 
 					event.returnValue = false; 
 			} 
 	 } 
      document.onkeydown = onKeyDown; 
     function stop(){ //这个是禁用鼠标右键 
		return false; 
	 } 
	 document.oncontextmenu=stop; 
 </script> 
    <script type="text/javascript">
    function serachQuery(num) {
		var operatorIDflag = (checkCE(Trim(document.getElementById('operatorID').value)) <= 0);
		var startTimeflag = (checkCE(Trim(document.getElementById('start').value)) <= 0);
		var endTimeflag = (checkCE(Trim(document.getElementById('end').value)) <= 0);
		//提醒输入开始日期和结束日期
    
		if(startTimeflag == true){
			alert('开始日期不能为空');
			return false;
		}
		if(endTimeflag == true){
			alert('结束日期不能为空');
			return false;
		}	
		document.myform.action = "opLogAction!getPosOpWasteList.action?pageNum="+num;
		document.myform.submit();
	}
	function goDetail(wasteSN){
	document.myform.action = "opLogAction!getDetail.action?wasteSN=" + wasteSN;
	document.myform.submit();
	}
    </script>
    </head>
   <body>
   <form id="myform" name="myform" method="post" action="">
		<table width="95%" cellpadding="0" cellspacing="0" border="1" class="table" align="center">
		<tr>
  			<td colspan="6">
  				<table width="100%" class="top" cellpadding="0" cellspacing="0">
  			 		<tr>
               			 <td>当前位置:&nbsp;<a href="#">业务查询</a>&nbsp;&gt;&gt;&nbsp;<a href="#">操作日志查询</a> &gt;&gt;&nbsp;</td>
              		</tr>
  				</table>
  			</td>
  		</tr>
  		
  		<tr>
  			<td colspan="1">
  				<table width="100%"  cellpadding="0" cellspacing="0" height="27">
  					<tr class="trBlackTitle">
  						 <td width="80%"><font style="font-weight:bold">查询条件</font></td>
  						 <td><input type="button" class="btn7" value="查询" onclick="serachQuery(1)"/></td>
  					</tr>
  				</table>
  			</td>
  		</tr>
  			  <tr>
  			<td colspan="1" height="160px" valign="top">
  				<table width="100%" cellpadding="5" cellspacing="1" border="0"> 
  					 <tr>
  					 <td class="td_dashed1" width="11%">操作员</td>
  						<td colspan="3">
  								<select name="operatorID">
  								<option value="-1" >请选择操作员</option>
  									<s:if test="operList!=null && operList.size()>0">
  										<s:iterator value="operList" id="oper">
  											<option value='<s:property value="#oper.Oper"/>'>
  												<s:property value="#oper.OperName"/>
  											</option>
  										</s:iterator>
  									</s:if>
  								</select>
  						</td>
					 
  							 <td class="td_dashed1" width="11%">时间范围</td>
  						<td colspan="3" > 
  			 <% 
				Date start = (Date)request.getAttribute("beginTime");
				String tempstart = "";
				String tempend = "";
				
				if(start == null){
					//tempstart = DateUtil.getNowDate();
				}else{
					tempstart = DateUtil.parseDateToString(start);
				}
				
				Date end = (Date)request.getAttribute("endTime");
				if(end == null){
				   //tempend = DateUtil.getNowDate();
				}else{
					tempend = DateUtil.formatDate(end);
				}
			%>
				<input id="start" name="beginTime" class="Wdate" value="<%=tempstart %>" type="text"
					onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'end\')||\'2020-10-01\'}'})"  />
				&nbsp;至&nbsp;
				<input id="end" name="endTime" class="Wdate" value="<%=tempend %>" type="text"
				onFocus="WdatePicker({minDate:'#F{$dp.$D(\'start\')}'})"  />
            </td>	
           
 					 </tr>
 		 </table>
 			</td>
 	  </tr>	
  		
  		<tr>
  			<td colspan="1">
  				<table width="100%"  cellpadding="0" cellspacing="0">
  					<tr class="trBlackTitle">
  						 <td width="80%"><font style="font-weight:bold">操作信息</font></td>
  					</tr>
  				</table>
  			</td>
  		</tr>
  		<tr>
		  	<td colspan="1" height="160px" valign="top">
		  		<table width="100%" cellpadding="5" cellspacing="1" border="0">
		  			<s:if test="posOpWaste != null">
		  			<tr>
		  				<td class="td_dashed1" width="11%">操作时间</td>
		  				<td class="td_dashed1" width="11%">操作员</td>
		  				<td class="td_dashed1" width="11%">操作类型</td>
		  				<td class="td_dashed1" width="11%">办理网点</td>
		  				<td class="td_dashed1" width="11%">操作结果</td>
		  				<td class="td_dashed1" width="11%">操作</td>
		  			</tr>
		  			
		  			<s:iterator value="posOpWaste" id="posOp">
		  				<tr>
		  					<td><s:property value="#posOp.OperTime"/></td>
		  					<td><s:property value="#posOp.OperatorID"/></td>
		  					<td><s:property value="#posOp.OperType"/></td>
		  					<td><s:property value="#posOp.POSID"/></td>
		  					<td>
		  					<s:if test="#posOp.Result==0">失败</s:if>
		  					<s:else>成功</s:else>
		  					</td>
		  					<td class="td_align1">
		  						<input onClick="goDetail('<s:property value="#posOp.WasteSN"/>')" type="button" 
          						class="btn3" onMouseOver="this.className='btn4'" 
          						onMouseOut="this.className='btn3'"  name="add2" value="明细"
          						<s:if test="#card.CardStatus!=3">disabled</s:if>
          						/>
		  					</td>
		 				</tr>
		  			</s:iterator>
		  		
		  			 <tr>
		  			               <td colspan=6 align="center"><s:property value="str_pageInfor" escape="false"/></td>

					</tr>
		            </s:if>	
		 		</table>
		 	</td>
		</tr>
  		</table>
  	</form>
  </body>
</html>
